package org.slusk.thynwor.feedback;

import org.slusk.thynwor.corestructures.Drone;
import org.slusk.thynwor.corestructures.Drone.MoveOrder;
import org.slusk.thynwor.util.Coordinates;

import com.anji.hyperneat.nd.NDFloatArray;
import com.anji.hyperneat.onlinereinforcement.trainingbank.Feedback;
import com.anji.hyperneat.onlinereinforcement.trainingbank.TrainingSample;

public interface IFeedbackProvider {

	/**
	 * This must not return null; Use neutral type for feedback that should not be immediately provided to the net.  
	 * For the training sequences, neutral types should be converted to reinforcement (or punishment).
	 * @param bot
	 * @param mo
	 * @param inputs
	 * @param outputCoords
	 * @param outputs
	 * @return
	 */
	public abstract Feedback getFeedback(Drone bot, MoveOrder mo, NDFloatArray inputs, Coordinates outputCoords, NDFloatArray outputs);

	public abstract void provideFitnessFeedBackToEnvironment(Drone bot, float[] signalInputs, MoveOrder mo);

	public abstract void convertTrainingSampleToReinforcement(ThynworTrainingSample sample, float weight);
	public abstract void convertTrainingSampleToPunishment(ThynworTrainingSample sample);
}